class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: D = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.p: F = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.s: E = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: A = None
        self.txt = txt

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

g.u = b
g.w = n
g.q = n
g.v = e
i.y = k
i.x = c
i.p = c
i.t = e
e.w = g
e.p = k
a.w = n
a.y = n
a.r = e
l.t = i
l.w = k
l.s = k
l.v = e
c.u = k
c.x = f
b.u = l
b.x = f
f.u = c
f.w = n
f.q = a
f.v = e
n.w = a
n.y = a
n.r = e
k.t = i
k.w = l
k.s = l
k.v = e
assert e.p.t.t.w.v.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: D = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: F = None
        self.p: F = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: E = None
        self.s: E = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: A = None
        self.txt = txt

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

g.u = b
g.w = n
g.q = n
g.v = e
i.y = k
i.x = c
i.p = c
i.t = e
e.w = g
e.p = k
a.w = n
a.y = n
a.r = e
l.t = i
l.w = k
l.s = k
l.v = e
c.u = k
c.x = f
b.u = l
b.x = f
f.u = c
f.w = n
f.q = a
f.v = e
n.w = a
n.y = a
n.r = e
k.t = i
k.w = l
k.s = l
k.v = e
assert e.p.t.t.w.v.txt == "e"