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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.z: B = None
        self.r: B = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.z: B = None
        self.r: B = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

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

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

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