class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: C = None
        self.z: E = None
        self.u: E = None
        self.v: D = None
        self.p: H = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: A = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.o: G = None
        self.y: A = None
        self.v: E = None
        self.q: A = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: B = None
        self.w: F = None
        self.q: A = None
        self.o: A = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: A = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.o: G = None
        self.y: A = None
        self.v: E = None
        self.q: A = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: B = None
        self.w: F = None
        self.q: A = None
        self.o: A = None
        self.u: B = None
        self.txt = txt

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

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