class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: C = None
        self.z: I = None
        self.p: B = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.o: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: A = None
        self.x: F = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.o: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: A = None
        self.x: F = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

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

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

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