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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.z: E = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.x: E = None
        self.v: E = None
        self.u: F = None
        self.w: C = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: C = None
        self.p: H = None
        self.w: B = None
        self.u: C = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.z: E = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.x: E = None
        self.v: E = None
        self.u: F = None
        self.w: C = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: C = None
        self.p: H = None
        self.w: B = None
        self.u: C = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

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

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