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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: D = None
        self.s: D = None
        self.w: B = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.r: D = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: D = None
        self.s: D = None
        self.w: B = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.r: D = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

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

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