class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: H = None
        self.z: B = None
        self.w: G = None
        self.o: E = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: B = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: A = None
        self.u: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: A = None
        self.w: E = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: B = None
        self.v: G = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: A = None
        self.u: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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