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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: D = None
        self.p: E = None
        self.w: E = None
        self.q: C = None
        self.s: E = None
        self.txt = txt

h = A("h")
d = B("d")
j = C("j")
c = D("c")
i = E("i")
k = F("k")
a = A("a")
m = F("m")
b = F("b")
f = B("f")

h.x = d
h.z = c
d.v = j
d.o = b
d.p = a
d.t = a
j.w = d
j.p = c
c.w = m
c.z = a
i.z = d
k.y = j
k.q = j
k.z = c
k.p = i
k.w = i
k.s = i
a.x = d
a.z = c
m.y = j
m.q = j
m.z = c
m.p = i
m.w = i
m.s = i
b.y = j
b.q = j
b.z = c
b.p = i
b.w = i
b.s = i
f.v = j
f.o = k
f.p = a
f.t = a
assert i.z.o.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: D = None
        self.p: E = None
        self.w: E = None
        self.q: C = None
        self.s: E = None
        self.txt = txt

h = A("h")
d = B("d")
j = C("j")
c = D("c")
i = E("i")
k = F("k")
a = A("a")
m = F("m")
b = F("b")
f = B("f")

h.x = d
h.z = c
d.v = j
d.o = b
d.p = a
d.t = a
j.w = d
j.p = c
c.w = m
c.z = a
i.z = d
k.y = j
k.q = j
k.z = c
k.p = i
k.w = i
k.s = i
a.x = d
a.z = c
m.y = j
m.q = j
m.z = c
m.p = i
m.w = i
m.s = i
b.y = j
b.q = j
b.z = c
b.p = i
b.w = i
b.s = i
f.v = j
f.o = k
f.p = a
f.t = a
assert i.z.o.z.z.z.txt == "c"