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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: A = None
        self.q: F = None
        self.u: G = None
        self.s: F = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

e = A("e")
j = B("j")
g = C("g")
b = D("b")
n = E("n")
h = F("h")
l = G("l")
f = G("f")
c = C("c")

e.v = j
e.s = j
e.x = h
j.t = b
j.q = b
j.z = g
j.r = f
g.o = c
b.o = n
n.x = e
n.o = e
n.q = h
n.s = h
n.v = h
n.u = l
n.w = j
h.w = n
l.z = e
l.w = j
l.p = j
l.q = c
f.z = e
f.w = j
f.p = j
f.q = g
c.o = g
assert e.s.q.o.v.w.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: A = None
        self.q: F = None
        self.u: G = None
        self.s: F = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.p: B = None
        self.q: C = None
        self.txt = txt

e = A("e")
j = B("j")
g = C("g")
b = D("b")
n = E("n")
h = F("h")
l = G("l")
f = G("f")
c = C("c")

e.v = j
e.s = j
e.x = h
j.t = b
j.q = b
j.z = g
j.r = f
g.o = c
b.o = n
n.x = e
n.o = e
n.q = h
n.s = h
n.v = h
n.u = l
n.w = j
h.w = n
l.z = e
l.w = j
l.p = j
l.q = c
f.z = e
f.w = j
f.p = j
f.q = g
c.o = g
assert e.s.q.o.v.w.u.p.txt == "j"