class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.o: F = None
        self.u: C = None
        self.p: D = None
        self.y: F = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: D = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.w: D = None
        self.o: D = None
        self.u: B = None
        self.p: F = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: C = None
        self.s: G = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: D = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.w: D = None
        self.o: D = None
        self.u: B = None
        self.p: F = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: C = None
        self.s: G = None
        self.x: G = None
        self.txt = txt

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

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

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