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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: C = None
        self.z: B = None
        self.q: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: C = None
        self.z: B = None
        self.q: C = None
        self.v: E = None
        self.txt = txt

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

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

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