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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: F = None
        self.z: G = None
        self.p: I = None
        self.o: D = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: H = None
        self.u: I = None
        self.y: B = None
        self.s: F = None
        self.o: H = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: B = None
        self.u: H = None
        self.q: D = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.s: E = None
        self.o: E = None
        self.p: G = None
        self.w: A = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: F = None
        self.z: G = None
        self.p: I = None
        self.o: D = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: H = None
        self.u: I = None
        self.y: B = None
        self.s: F = None
        self.o: H = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: B = None
        self.u: H = None
        self.q: D = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.s: E = None
        self.o: E = None
        self.p: G = None
        self.w: A = None
        self.r: F = None
        self.z: G = None
        self.txt = txt

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

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

i.p = c
i.v = c
i.z = c
i.t = j
i.y = f
i.w = l
i.x = l
i.q = l
i.s = g
c.v = h
c.z = g
c.y = i
m.t = j
m.w = j
m.z = l
m.s = l
m.p = b
m.o = f
f.w = g
f.t = j
h.w = c
h.y = c
h.r = g
h.o = g
h.u = b
h.s = j
h.x = j
j.r = g
l.s = g
l.u = g
l.r = c
l.q = f
l.x = j
g.t = i
g.w = i
g.x = m
g.s = h
g.o = h
g.p = l
g.z = l
g.r = j
b.w = l
b.p = j
assert b.w.r.v.u.p.txt == "j"