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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.p: D = None
        self.o: D = None
        self.u: G = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: B = None
        self.z: A = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: C = None
        self.y: E = None
        self.s: D = None
        self.o: D = None
        self.q: F = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.p: D = None
        self.o: D = None
        self.u: G = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: B = None
        self.z: A = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: C = None
        self.y: E = None
        self.s: D = None
        self.o: D = None
        self.q: F = None
        self.r: D = None
        self.txt = txt

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

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