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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: E = None
        self.y: H = None
        self.w: I = None
        self.o: A = None
        self.t: E = None
        self.q: H = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.y: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: E = None
        self.y: H = None
        self.w: I = None
        self.o: A = None
        self.t: E = None
        self.q: H = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: D = None
        self.y: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

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