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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

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