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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: I = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.w: I = None
        self.r: F = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: D = None
        self.r: D = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: I = None
        self.s: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.w: I = None
        self.r: F = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: D = None
        self.r: D = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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