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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: B = None
        self.x: A = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: D = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: B = None
        self.x: A = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: D = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

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

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