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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: F = None
        self.v: I = None
        self.t: C = None
        self.s: C = None
        self.x: F = None
        self.w: I = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.y: G = None
        self.s: H = None
        self.p: G = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: G = None
        self.q: H = None
        self.w: I = None
        self.v: A = None
        self.s: I = None
        self.o: G = None
        self.z: G = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: A = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: E = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: F = None
        self.v: I = None
        self.t: C = None
        self.s: C = None
        self.x: F = None
        self.w: I = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: G = None
        self.y: G = None
        self.s: H = None
        self.p: G = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: G = None
        self.q: H = None
        self.w: I = None
        self.v: A = None
        self.s: I = None
        self.o: G = None
        self.z: G = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: A = None
        self.w: E = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: E = None
        self.y: C = None
        self.s: B = None
        self.txt = txt

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

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