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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.v: B = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: C = None
        self.o: D = None
        self.z: B = None
        self.r: C = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.t: C = None
        self.x: B = None
        self.u: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.v: B = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: C = None
        self.o: D = None
        self.z: B = None
        self.r: C = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: D = None
        self.t: C = None
        self.x: B = None
        self.u: B = None
        self.p: A = None
        self.txt = txt

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

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

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