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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.o: D = None
        self.t: D = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: A = None
        self.r: A = None
        self.p: B = None
        self.v: D = None
        self.u: A = None
        self.txt = txt

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

d = A("d")
n = B("n")
e = C("e")
c = D("c")
j = E("j")
i = F("i")
g = C("g")
m = A("m")
h = D("h")
k = E("k")

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.o: D = None
        self.t: D = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: A = None
        self.r: A = None
        self.p: B = None
        self.v: D = None
        self.u: A = None
        self.txt = txt

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

d = A("d")
n = B("n")
e = C("e")
c = D("c")
j = E("j")
i = F("i")
g = C("g")
m = A("m")
h = D("h")
k = E("k")

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