class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: I = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.r: A = None
        self.q: A = None
        self.p: E = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: A = None
        self.w: I = None
        self.r: H = None
        self.q: A = None
        self.t: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: B = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.v: A = None
        self.y: I = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: I = None
        self.s: I = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.s: B = None
        self.o: B = None
        self.y: B = None
        self.z: D = None
        self.txt = txt

m = A("m")
b = B("b")
h = C("h")
c = D("c")
k = E("k")
i = F("i")
e = G("e")
l = H("l")
f = I("f")

m.t = l
m.v = f
m.x = b
b.u = h
h.y = b
h.w = m
h.r = m
h.q = m
h.p = k
h.v = e
c.y = m
c.z = m
c.q = m
c.w = f
c.r = l
c.t = k
c.p = b
k.z = b
k.q = b
k.u = e
i.u = m
i.v = m
i.t = k
i.y = f
i.q = f
e.s = c
e.p = k
l.v = h
l.r = f
l.s = f
l.p = i
f.w = h
f.r = m
f.s = b
f.o = b
f.y = b
f.z = c
assert h.q.t.p.v.x.u.p.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: I = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.r: A = None
        self.q: A = None
        self.p: E = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: A = None
        self.w: I = None
        self.r: H = None
        self.q: A = None
        self.t: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: B = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.v: A = None
        self.y: I = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: I = None
        self.s: I = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.s: B = None
        self.o: B = None
        self.y: B = None
        self.z: D = None
        self.txt = txt

m = A("m")
b = B("b")
h = C("h")
c = D("c")
k = E("k")
i = F("i")
e = G("e")
l = H("l")
f = I("f")

m.t = l
m.v = f
m.x = b
b.u = h
h.y = b
h.w = m
h.r = m
h.q = m
h.p = k
h.v = e
c.y = m
c.z = m
c.q = m
c.w = f
c.r = l
c.t = k
c.p = b
k.z = b
k.q = b
k.u = e
i.u = m
i.v = m
i.t = k
i.y = f
i.q = f
e.s = c
e.p = k
l.v = h
l.r = f
l.s = f
l.p = i
f.w = h
f.r = m
f.s = b
f.o = b
f.y = b
f.z = c
assert h.q.t.p.v.x.u.p.u.p.txt == "k"