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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.r: B = None
        self.q: F = None
        self.v: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

g.v = j
g.q = l
a.p = l
a.u = j
a.q = j
a.r = b
a.v = b
l.x = a
l.t = n
l.r = n
l.v = j
l.o = j
n.x = g
d.u = e
d.q = b
d.w = c
j.u = d
b.p = l
b.u = j
b.q = j
b.r = c
b.v = m
e.x = g
m.p = l
m.u = j
m.q = j
m.r = c
m.v = a
c.p = l
c.u = j
c.q = j
c.r = m
c.v = m
assert e.x.q.x.v.p.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.r: B = None
        self.q: F = None
        self.v: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.w: B = None
        self.txt = txt

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

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

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