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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: A = None
        self.w: D = None
        self.o: H = None
        self.v: E = None
        self.t: G = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: E = None
        self.y: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: A = None
        self.w: B = None
        self.v: F = None
        self.t: G = None
        self.r: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: A = None
        self.w: D = None
        self.o: H = None
        self.v: E = None
        self.t: G = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: E = None
        self.y: A = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: A = None
        self.w: B = None
        self.v: F = None
        self.t: G = None
        self.r: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: F = None
        self.txt = txt

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

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