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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: F = None
        self.z: A = None
        self.x: C = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.t: E = None
        self.x: E = None
        self.q: A = None
        self.txt = txt

j = A("j")
f = B("f")
h = C("h")
g = D("g")
e = E("e")
i = F("i")
k = B("k")
l = D("l")
b = A("b")

j.x = l
j.y = l
j.o = i
j.w = e
j.r = f
j.s = h
f.p = h
f.x = h
f.y = i
f.r = i
f.z = j
f.w = l
h.t = k
g.t = i
e.z = g
e.y = g
i.o = e
i.t = e
i.x = e
i.u = f
i.q = b
k.p = h
k.x = h
k.y = i
k.r = i
k.z = j
k.w = g
l.t = i
b.x = l
b.o = i
b.w = e
b.y = g
b.r = f
b.s = h
assert l.t.o.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: F = None
        self.w: E = None
        self.y: D = None
        self.r: B = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: F = None
        self.z: A = None
        self.x: C = None
        self.w: D = None
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.t: E = None
        self.x: E = None
        self.q: A = None
        self.txt = txt

j = A("j")
f = B("f")
h = C("h")
g = D("g")
e = E("e")
i = F("i")
k = B("k")
l = D("l")
b = A("b")

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