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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.p: C = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.t: E = None
        self.v: A = None
        self.u: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.t: A = None
        self.txt = txt

d = A("d")
j = B("j")
i = C("i")
f = D("f")
k = E("k")
g = F("g")
a = G("a")
m = F("m")
h = C("h")
b = C("b")

d.z = a
d.x = j
j.u = f
j.w = d
i.q = g
i.u = k
i.p = b
i.o = f
f.y = h
k.r = i
g.p = d
g.v = d
g.o = a
g.t = k
g.u = m
a.o = f
a.v = m
a.t = d
m.p = d
m.v = d
m.o = a
m.t = k
m.u = g
h.q = g
h.u = k
h.p = i
h.o = f
b.q = m
b.u = k
b.p = h
b.o = f
assert b.o.y.q.u.o.o.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: E = None
        self.p: C = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: G = None
        self.t: E = None
        self.v: A = None
        self.u: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.t: A = None
        self.txt = txt

d = A("d")
j = B("j")
i = C("i")
f = D("f")
k = E("k")
g = F("g")
a = G("a")
m = F("m")
h = C("h")
b = C("b")

d.z = a
d.x = j
j.u = f
j.w = d
i.q = g
i.u = k
i.p = b
i.o = f
f.y = h
k.r = i
g.p = d
g.v = d
g.o = a
g.t = k
g.u = m
a.o = f
a.v = m
a.t = d
m.p = d
m.v = d
m.o = a
m.t = k
m.u = g
h.q = g
h.u = k
h.p = i
h.o = f
b.q = m
b.u = k
b.p = h
b.o = f
assert b.o.y.q.u.o.o.y.p.txt == "i"