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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: F = None
        self.w: G = None
        self.q: E = None
        self.z: B = None
        self.o: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.q: C = None
        self.u: C = None
        self.x: E = None
        self.s: F = None
        self.w: C = None
        self.txt = txt

d = A("d")
g = B("g")
k = C("k")
l = D("l")
a = E("a")
b = F("b")
m = G("m")
f = G("f")
j = B("j")

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: F = None
        self.w: G = None
        self.q: E = None
        self.z: B = None
        self.o: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: F = None
        self.q: C = None
        self.u: C = None
        self.x: E = None
        self.s: F = None
        self.w: C = None
        self.txt = txt

d = A("d")
g = B("g")
k = C("k")
l = D("l")
a = E("a")
b = F("b")
m = G("m")
f = G("f")
j = B("j")

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