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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

l.t = k
l.u = b
l.s = g
n.z = e
n.t = h
n.q = h
n.u = i
n.s = d
h.s = g
h.v = i
h.o = i
k.w = l
d.z = k
d.s = g
e.y = h
e.s = g
i.s = g
i.v = h
i.o = h
b.y = i
b.s = l
g.t = k
g.u = e
g.s = l
assert k.w.u.s.u.s.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: F = None
        self.s: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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