class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.t: G = None
        self.w: D = None
        self.r: D = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.s: E = None
        self.w: F = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: D = None
        self.y: E = None
        self.z: B = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

l = A("l")
h = B("h")
a = C("a")
j = D("j")
n = E("n")
b = F("b")
c = G("c")
i = G("i")
f = B("f")
k = C("k")

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

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.t: G = None
        self.w: D = None
        self.r: D = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.s: E = None
        self.w: F = None
        self.z: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: D = None
        self.y: E = None
        self.z: B = None
        self.r: A = None
        self.u: C = None
        self.txt = txt

l = A("l")
h = B("h")
a = C("a")
j = D("j")
n = E("n")
b = F("b")
c = G("c")
i = G("i")
f = B("f")
k = C("k")

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