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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: B = None
        self.x: C = None
        self.txt = txt

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

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

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

m.z = d
m.w = e
m.p = j
m.v = c
h.w = e
h.y = c
h.r = j
h.p = a
d.w = a
d.t = a
d.x = a
d.y = c
d.p = f
f.r = a
f.q = h
f.x = d
j.o = a
j.t = b
j.w = f
j.z = f
j.q = f
j.x = c
c.z = d
c.r = b
c.w = a
c.p = f
c.t = e
b.z = d
b.w = h
b.p = j
b.v = c
a.o = j
a.t = b
a.w = f
a.z = f
a.q = f
a.x = c
e.w = h
e.y = c
e.r = a
e.p = j
assert b.v.t.r.o.z.x.w.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: B = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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