class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.t: G = None
        self.r: F = None
        self.v: E = None
        self.o: I = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: F = None
        self.o: D = None
        self.t: G = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: I = None
        self.o: E = None
        self.u: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

a.p = f
a.x = f
a.t = h
a.r = d
a.v = c
a.o = m
a.q = j
f.y = b
j.y = m
j.v = d
j.o = k
j.t = h
j.p = c
k.p = m
k.t = j
k.r = c
k.x = d
c.u = d
c.r = d
c.o = j
c.y = h
c.x = l
c.z = b
c.w = f
c.q = a
d.r = h
d.q = l
d.u = l
d.o = c
h.u = c
h.v = d
h.w = j
b.v = j
b.y = j
b.x = k
b.r = h
b.p = d
b.s = d
b.t = l
b.o = f
m.s = f
l.s = f
assert h.v.r.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.t: G = None
        self.r: F = None
        self.v: E = None
        self.o: I = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: F = None
        self.o: D = None
        self.t: G = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: I = None
        self.o: E = None
        self.u: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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