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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.z: D = None
        self.s: D = None
        self.x: B = None
        self.t: G = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.z: D = None
        self.s: D = None
        self.x: B = None
        self.t: G = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: G = None
        self.r: B = None
        self.txt = txt

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

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

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