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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.s: G = None
        self.y: H = None
        self.w: F = None
        self.txt = txt

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

c.w = m
c.y = m
k.r = m
k.w = g
k.x = b
k.o = a
k.p = a
a.v = d
a.p = e
b.r = g
d.z = a
d.o = c
m.s = e
m.v = e
m.t = k
m.o = d
m.z = a
m.y = g
g.v = k
g.p = m
g.x = j
g.y = a
l.s = c
l.o = e
l.z = e
l.x = m
l.w = g
l.u = g
e.p = c
e.z = d
e.s = g
e.y = l
e.w = m
j.r = m
j.w = g
j.x = b
j.o = a
j.p = a
assert g.x.w.p.o.z.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: F = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.s: G = None
        self.y: H = None
        self.w: F = None
        self.txt = txt

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

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