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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: D = None
        self.s: B = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: D = None
        self.s: B = None
        self.r: B = None
        self.v: E = None
        self.txt = txt

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

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