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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: F = None
        self.x: A = None
        self.s: C = None
        self.y: D = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: F = None
        self.z: H = None
        self.v: I = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: D = None
        self.t: I = None
        self.y: G = None
        self.s: E = None
        self.w: I = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: F = None
        self.x: A = None
        self.s: C = None
        self.y: D = None
        self.z: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: F = None
        self.z: H = None
        self.v: I = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: D = None
        self.t: I = None
        self.y: G = None
        self.s: E = None
        self.w: I = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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