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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: F = None
        self.p: E = None
        self.txt = txt

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

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

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

l = A("l")
i = B("i")
n = C("n")
b = D("b")
a = E("a")
g = F("g")
h = D("h")

l.t = n
l.s = n
l.u = a
i.u = n
i.v = h
n.o = g
n.z = g
n.p = a
b.s = i
b.w = a
b.t = l
b.o = g
b.y = h
b.z = h
a.s = i
a.z = b
g.q = l
g.z = l
h.s = i
h.w = a
h.t = l
h.o = g
h.y = b
h.z = b
assert a.z.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: C = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: F = None
        self.p: E = None
        self.txt = txt

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

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

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

l = A("l")
i = B("i")
n = C("n")
b = D("b")
a = E("a")
g = F("g")
h = D("h")

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