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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: I = None
        self.r: F = None
        self.t: I = None
        self.y: A = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.w: H = None
        self.p: G = None
        self.u: D = None
        self.r: A = None
        self.q: E = None
        self.txt = txt

l = A("l")
b = B("b")
a = C("a")
n = D("n")
f = E("f")
k = F("k")
m = G("m")
j = H("j")
h = I("h")

l.q = m
l.v = m
l.t = n
l.p = a
b.t = k
a.z = k
n.o = k
n.w = a
n.y = j
f.x = m
k.x = h
k.w = n
m.y = a
m.v = l
m.q = f
j.u = l
j.y = l
j.o = h
j.t = h
j.r = k
j.s = m
j.p = a
h.o = a
h.z = m
h.p = m
h.w = j
h.u = n
h.r = l
h.q = f
assert b.t.x.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.p: C = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: I = None
        self.r: F = None
        self.t: I = None
        self.y: A = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.w: H = None
        self.p: G = None
        self.u: D = None
        self.r: A = None
        self.q: E = None
        self.txt = txt

l = A("l")
b = B("b")
a = C("a")
n = D("n")
f = E("f")
k = F("k")
m = G("m")
j = H("j")
h = I("h")

l.q = m
l.v = m
l.t = n
l.p = a
b.t = k
a.z = k
n.o = k
n.w = a
n.y = j
f.x = m
k.x = h
k.w = n
m.y = a
m.v = l
m.q = f
j.u = l
j.y = l
j.o = h
j.t = h
j.r = k
j.s = m
j.p = a
h.o = a
h.z = m
h.p = m
h.w = j
h.u = n
h.r = l
h.q = f
assert b.t.x.z.y.txt == "a"