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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: J = None
        self.w: B = None
        self.v: B = None
        self.y: B = None
        self.o: C = None
        self.p: G = None
        self.r: B = None
        self.s: G = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: J = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: F = None
        self.o: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

h = A("h")
l = B("l")
n = C("n")
k = D("k")
e = E("e")
g = F("g")
i = G("i")
a = H("a")
b = I("b")
f = J("f")

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: J = None
        self.w: B = None
        self.v: B = None
        self.y: B = None
        self.o: C = None
        self.p: G = None
        self.r: B = None
        self.s: G = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: J = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: F = None
        self.o: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

h = A("h")
l = B("l")
n = C("n")
k = D("k")
e = E("e")
g = F("g")
i = G("i")
a = H("a")
b = I("b")
f = J("f")

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