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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: A = None
        self.r: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.t: G = None
        self.u: D = None
        self.o: D = None
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: G = None
        self.x: A = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.q: E = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

c.s = f
c.r = f
c.q = j
m.v = e
m.r = e
m.s = c
m.q = j
f.v = j
f.x = j
f.p = b
f.r = b
f.t = n
f.u = d
f.o = d
d.u = c
d.v = n
d.x = n
d.t = f
d.y = f
j.u = e
j.r = n
j.x = c
j.z = d
j.t = b
e.s = b
e.o = m
e.q = j
e.t = d
n.r = d
a.r = d
l.r = d
b.v = e
b.r = e
b.s = c
b.q = j
assert m.v.t.u.r.o.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: A = None
        self.r: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.t: G = None
        self.u: D = None
        self.o: D = None
        self.r: B = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: G = None
        self.x: A = None
        self.z: D = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.q: E = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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