class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: F = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.y: D = None
        self.v: E = None
        self.z: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: C = None
        self.p: A = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.w: B = None
        self.o: C = None
        self.y: C = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

k = A("k")
f = B("f")
m = C("m")
b = D("b")
h = E("h")
e = F("e")
l = G("l")
d = C("d")
a = A("a")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: F = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.y: D = None
        self.v: E = None
        self.z: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: C = None
        self.p: A = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.w: B = None
        self.o: C = None
        self.y: C = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

k = A("k")
f = B("f")
m = C("m")
b = D("b")
h = E("h")
e = F("e")
l = G("l")
d = C("d")
a = A("a")

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