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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: C = None
        self.z: A = None
        self.q: C = None
        self.txt = txt

j = A("j")
l = B("l")
k = C("k")
d = D("d")
e = E("e")
h = F("h")
i = G("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: C = None
        self.z: A = None
        self.q: C = None
        self.txt = txt

j = A("j")
l = B("l")
k = C("k")
d = D("d")
e = E("e")
h = F("h")
i = G("i")

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