class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.q: A = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.z: F = None
        self.y: F = None
        self.txt = txt

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

g.u = n
g.q = l
g.r = a
g.y = c
h.s = a
h.v = a
h.u = c
a.x = e
a.r = e
a.s = e
a.q = g
e.s = l
e.o = l
l.z = a
l.w = n
l.p = d
l.o = g
n.r = d
n.u = d
n.z = d
n.y = d
d.r = n
d.u = n
d.z = n
d.y = n
c.s = a
c.v = a
c.u = h
assert e.s.w.u.z.y.u.y.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.r: C = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.q: A = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.z: F = None
        self.y: F = None
        self.txt = txt

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

g.u = n
g.q = l
g.r = a
g.y = c
h.s = a
h.v = a
h.u = c
a.x = e
a.r = e
a.s = e
a.q = g
e.s = l
e.o = l
l.z = a
l.w = n
l.p = d
l.o = g
n.r = d
n.u = d
n.z = d
n.y = d
d.r = n
d.u = n
d.z = n
d.y = n
c.s = a
c.v = a
c.u = h
assert e.s.w.u.z.y.u.y.z.txt == "n"