class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: I = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: A = None
        self.s: I = None
        self.w: B = None
        self.z: G = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: J = None
        self.s: J = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.t: J = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: G = None
        self.o: E = None
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: A = None
        self.s: I = None
        self.w: B = None
        self.z: G = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: J = None
        self.s: J = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: A = None
        self.t: J = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: G = None
        self.o: E = None
        self.z: E = None
        self.v: C = None
        self.txt = txt

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

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

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

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