class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: B = None
        self.t: G = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: E = None
        self.v: I = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.r: D = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.p: D = None
        self.z: H = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.p: F = None
        self.t: E = None
        self.z: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: E = None
        self.v: I = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.r: D = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.p: D = None
        self.z: H = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.p: F = None
        self.t: E = None
        self.z: H = None
        self.txt = txt

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

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

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

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