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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: F = None
        self.q: G = None
        self.u: G = None
        self.x: G = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: F = None
        self.q: G = None
        self.u: G = None
        self.x: G = None
        self.o: A = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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