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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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