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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: E = None
        self.w: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: E = None
        self.w: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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