class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: A = None
        self.q: E = None
        self.u: D = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.x: C = None
        self.s: I = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: E = None
        self.w: A = None
        self.u: C = None
        self.y: H = None
        self.q: G = None
        self.x: G = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.x: D = None
        self.s: E = None
        self.w: H = None
        self.r: B = None
        self.v: H = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.t: G = None
        self.u: A = None
        self.r: A = None
        self.v: C = None
        self.y: E = None
        self.s: C = None
        self.x: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: A = None
        self.q: E = None
        self.u: D = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.x: C = None
        self.s: I = None
        self.v: F = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: E = None
        self.w: A = None
        self.u: C = None
        self.y: H = None
        self.q: G = None
        self.x: G = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.x: D = None
        self.s: E = None
        self.w: H = None
        self.r: B = None
        self.v: H = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: D = None
        self.t: G = None
        self.u: A = None
        self.r: A = None
        self.v: C = None
        self.y: E = None
        self.s: C = None
        self.x: H = None
        self.txt = txt

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

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