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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.x: I = None
        self.s: D = None
        self.o: A = None
        self.p: I = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.z: A = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.x: I = None
        self.s: D = None
        self.o: A = None
        self.p: I = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.z: A = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

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