class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.w: D = None
        self.u: D = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

g.v = k
g.x = k
g.w = i
g.u = n
g.t = d
k.y = e
k.w = a
h.z = i
h.t = a
h.v = g
n.q = a
n.v = g
n.p = k
d.y = g
d.t = e
a.o = f
i.q = a
i.v = g
i.p = k
f.z = n
f.t = a
f.v = g
e.y = g
e.t = d
l.z = n
l.t = a
l.v = g
assert g.t.t.y.t.t.txt == "e"