class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.x: G = None
        self.o: E = None
        self.u: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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