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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.v: D = None
        self.r: C = None
        self.txt = txt

a = A("a")
f = B("f")
c = C("c")
b = D("b")
k = E("k")
i = F("i")
e = G("e")
l = H("l")
j = E("j")
g = B("g")

a.o = e
a.s = b
a.y = j
f.t = e
f.p = e
f.z = k
f.u = k
c.w = i
b.z = l
b.r = e
b.w = i
k.q = a
k.y = a
k.p = f
k.o = j
k.u = l
k.s = e
k.z = b
i.x = f
e.s = j
e.u = f
l.p = b
l.v = b
l.u = a
l.r = c
j.q = a
j.y = a
j.p = f
j.o = k
j.u = l
j.s = e
j.z = b
g.t = e
g.p = e
g.z = k
g.u = k
assert f.z.q.o.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.v: D = None
        self.r: C = None
        self.txt = txt

a = A("a")
f = B("f")
c = C("c")
b = D("b")
k = E("k")
i = F("i")
e = G("e")
l = H("l")
j = E("j")
g = B("g")

a.o = e
a.s = b
a.y = j
f.t = e
f.p = e
f.z = k
f.u = k
c.w = i
b.z = l
b.r = e
b.w = i
k.q = a
k.y = a
k.p = f
k.o = j
k.u = l
k.s = e
k.z = b
i.x = f
e.s = j
e.u = f
l.p = b
l.v = b
l.u = a
l.r = c
j.q = a
j.y = a
j.p = f
j.o = k
j.u = l
j.s = e
j.z = b
g.t = e
g.p = e
g.z = k
g.u = k
assert f.z.q.o.u.z.txt == "k"