class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: F = None
        self.y: C = None
        self.s: G = None
        self.v: F = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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