class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: D = None
        self.p: F = None
        self.q: H = None
        self.x: E = None
        self.o: B = None
        self.y: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: H = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: E = None
        self.u: A = None
        self.r: E = None
        self.x: F = None
        self.p: E = None
        self.txt = txt

l = A("l")
f = B("f")
k = C("k")
c = D("c")
i = E("i")
m = F("m")
a = G("a")
h = H("h")
d = E("d")

l.t = m
l.p = m
l.u = c
l.q = h
l.x = i
l.o = f
l.y = f
l.v = a
f.t = h
k.w = m
c.z = a
i.t = a
i.x = h
i.o = d
i.q = f
m.q = f
a.x = m
h.w = c
h.q = i
h.p = i
h.u = l
h.r = d
h.x = m
d.t = a
d.x = h
d.o = i
d.q = f
assert i.o.o.t.x.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: D = None
        self.p: F = None
        self.q: H = None
        self.x: E = None
        self.o: B = None
        self.y: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: H = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: E = None
        self.u: A = None
        self.r: E = None
        self.x: F = None
        self.p: E = None
        self.txt = txt

l = A("l")
f = B("f")
k = C("k")
c = D("c")
i = E("i")
m = F("m")
a = G("a")
h = H("h")
d = E("d")

l.t = m
l.p = m
l.u = c
l.q = h
l.x = i
l.o = f
l.y = f
l.v = a
f.t = h
k.w = m
c.z = a
i.t = a
i.x = h
i.o = d
i.q = f
m.q = f
a.x = m
h.w = c
h.q = i
h.p = i
h.u = l
h.r = d
h.x = m
d.t = a
d.x = h
d.o = i
d.q = f
assert i.o.o.t.x.q.t.txt == "h"