class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.t: D = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: A = None
        self.r: D = None
        self.u: F = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

c.w = f
c.v = i
c.q = i
c.t = d
h.y = d
h.r = i
h.q = i
f.x = e
f.u = e
f.y = c
f.z = c
f.r = d
d.u = c
j.p = c
j.r = c
j.z = g
j.q = d
j.x = k
j.v = e
e.r = f
e.z = g
e.s = g
e.v = g
e.p = d
e.x = i
g.p = c
g.r = c
g.z = j
g.q = k
g.x = k
g.v = e
k.u = c
i.x = e
i.u = e
i.y = c
i.z = c
i.r = k
n.y = d
n.r = i
n.q = f
assert e.x.x.p.u.w.r.u.w.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.t: D = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: A = None
        self.r: D = None
        self.u: F = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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