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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: I = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.w: H = None
        self.u: F = None
        self.t: E = None
        self.y: E = None
        self.v: H = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: I = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.w: H = None
        self.u: F = None
        self.t: E = None
        self.y: E = None
        self.v: H = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.y: A = None
        self.txt = txt

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

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

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