class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: F = None
        self.o: D = None
        self.x: E = None
        self.q: B = None
        self.p: E = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: A = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.z: D = None
        self.t: G = None
        self.p: D = None
        self.x: A = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: B = None
        self.v: B = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: A = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.z: D = None
        self.t: G = None
        self.p: D = None
        self.x: A = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: B = None
        self.v: B = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

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