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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: C = None
        self.t: G = None
        self.p: B = None
        self.q: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.z: C = None
        self.r: B = None
        self.s: E = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: C = None
        self.t: G = None
        self.p: B = None
        self.q: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.z: C = None
        self.r: B = None
        self.s: E = None
        self.q: G = None
        self.txt = txt

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

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

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

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