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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.q: D = None
        self.v: E = None
        self.r: D = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: B = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.q: F = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

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

d = A("d")
f = B("f")
n = C("n")
j = D("j")
i = E("i")
e = F("e")
h = G("h")
b = A("b")
k = F("k")
g = G("g")

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.q: D = None
        self.v: E = None
        self.r: D = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: B = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.q: F = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

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

d = A("d")
f = B("f")
n = C("n")
j = D("j")
i = E("i")
e = F("e")
h = G("h")
b = A("b")
k = F("k")
g = G("g")

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