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

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.t: C = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

g = A("g")
e = B("e")
d = C("d")
f = D("f")
j = E("j")
l = F("l")
c = E("c")
b = C("b")
a = D("a")

g.q = j
g.t = a
e.w = g
e.y = j
e.x = j
e.o = c
e.s = c
d.s = e
d.t = e
d.y = j
d.v = l
f.o = a
f.p = g
f.t = b
f.x = e
j.v = b
j.p = f
j.u = g
l.r = a
l.x = e
l.s = e
l.v = f
c.v = b
c.p = a
c.u = g
b.s = e
b.t = e
b.y = c
b.v = l
a.o = f
a.p = g
a.t = d
a.x = e
assert j.v.y.u.q.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.t: C = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

g = A("g")
e = B("e")
d = C("d")
f = D("f")
j = E("j")
l = F("l")
c = E("c")
b = C("b")
a = D("a")

g.q = j
g.t = a
e.w = g
e.y = j
e.x = j
e.o = c
e.s = c
d.s = e
d.t = e
d.y = j
d.v = l
f.o = a
f.p = g
f.t = b
f.x = e
j.v = b
j.p = f
j.u = g
l.r = a
l.x = e
l.s = e
l.v = f
c.v = b
c.p = a
c.u = g
b.s = e
b.t = e
b.y = c
b.v = l
a.o = f
a.p = g
a.t = d
a.x = e
assert j.v.y.u.q.p.x.txt == "e"