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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: G = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: H = None
        self.q: H = None
        self.x: A = None
        self.z: B = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: D = None
        self.v: E = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: G = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: H = None
        self.q: H = None
        self.x: A = None
        self.z: B = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: D = None
        self.v: E = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

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

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

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