class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: E = None
        self.y: E = None
        self.u: C = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: H = None
        self.q: F = None
        self.v: E = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: D = None
        self.o: G = None
        self.z: E = None
        self.u: G = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: H = None
        self.q: F = None
        self.v: E = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: D = None
        self.o: G = None
        self.z: E = None
        self.u: G = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

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

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

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