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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: A = None
        self.o: A = None
        self.u: G = None
        self.w: D = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: E = None
        self.z: E = None
        self.t: G = None
        self.v: D = None
        self.q: A = None
        self.p: G = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: A = None
        self.o: A = None
        self.u: G = None
        self.w: D = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: E = None
        self.z: E = None
        self.t: G = None
        self.v: D = None
        self.q: A = None
        self.p: G = None
        self.u: D = None
        self.txt = txt

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

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