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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: A = None
        self.r: D = None
        self.q: D = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: A = None
        self.r: D = None
        self.q: D = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

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

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