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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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