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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.v: D = None
        self.z: F = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: B = None
        self.z: A = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: A = None
        self.o: A = None
        self.txt = txt

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

i = A("i")
j = B("j")
l = C("l")
f = D("f")
a = E("a")
d = F("d")
g = B("g")
k = B("k")

i.x = l
i.z = d
i.p = d
j.s = a
j.o = d
j.z = d
j.v = f
j.r = f
j.q = l
l.u = d
l.p = g
l.w = g
l.z = i
l.q = k
f.q = d
f.y = d
f.x = l
f.t = a
a.w = l
a.p = i
a.o = i
d.z = f
d.x = k
g.s = a
g.o = d
g.z = d
g.v = f
g.r = f
g.q = l
k.s = a
k.o = d
k.z = d
k.v = f
k.r = f
k.q = l
assert i.x.p.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.v: D = None
        self.z: F = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: B = None
        self.z: A = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: A = None
        self.o: A = None
        self.txt = txt

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

i = A("i")
j = B("j")
l = C("l")
f = D("f")
a = E("a")
d = F("d")
g = B("g")
k = B("k")

i.x = l
i.z = d
i.p = d
j.s = a
j.o = d
j.z = d
j.v = f
j.r = f
j.q = l
l.u = d
l.p = g
l.w = g
l.z = i
l.q = k
f.q = d
f.y = d
f.x = l
f.t = a
a.w = l
a.p = i
a.o = i
d.z = f
d.x = k
g.s = a
g.o = d
g.z = d
g.v = f
g.r = f
g.q = l
k.s = a
k.o = d
k.z = d
k.v = f
k.r = f
k.q = l
assert i.x.p.v.y.txt == "d"