class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.y: C = None
        self.p: F = None
        self.x: E = None
        self.q: I = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: C = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.z: H = None
        self.v: G = None
        self.w: B = None
        self.p: G = None
        self.x: A = None
        self.u: E = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: D = None
        self.o: F = None
        self.u: E = None
        self.w: D = None
        self.y: A = None
        self.q: E = None
        self.r: A = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: F = None
        self.p: C = None
        self.q: C = None
        self.u: C = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: E = None
        self.p: H = None
        self.q: G = None
        self.v: B = None
        self.w: E = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.y: C = None
        self.p: F = None
        self.x: E = None
        self.q: I = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: C = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.z: H = None
        self.v: G = None
        self.w: B = None
        self.p: G = None
        self.x: A = None
        self.u: E = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: D = None
        self.o: F = None
        self.u: E = None
        self.w: D = None
        self.y: A = None
        self.q: E = None
        self.r: A = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: F = None
        self.p: C = None
        self.q: C = None
        self.u: C = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: E = None
        self.p: H = None
        self.q: G = None
        self.v: B = None
        self.w: E = None
        self.z: C = None
        self.t: F = None
        self.txt = txt

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

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