class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: H = None
        self.y: B = None
        self.q: D = None
        self.u: G = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.z: F = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: C = None
        self.t: H = None
        self.z: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.p: F = None
        self.t: B = None
        self.w: H = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

d = A("d")
j = B("j")
a = C("a")
k = D("k")
b = E("b")
c = F("c")
e = G("e")
n = H("n")
f = F("f")

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.z: F = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: C = None
        self.t: H = None
        self.z: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.p: F = None
        self.t: B = None
        self.w: H = None
        self.q: A = None
        self.x: A = None
        self.txt = txt

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

d = A("d")
j = B("j")
a = C("a")
k = D("k")
b = E("b")
c = F("c")
e = G("e")
n = H("n")
f = F("f")

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