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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.x: H = None
        self.r: F = None
        self.o: F = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: E = None
        self.t: B = None
        self.s: E = None
        self.w: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

l = A("l")
h = B("h")
g = C("g")
c = D("c")
i = E("i")
f = F("f")
d = G("d")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: D = None
        self.x: H = None
        self.r: F = None
        self.o: F = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: E = None
        self.t: B = None
        self.s: E = None
        self.w: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

l = A("l")
h = B("h")
g = C("g")
c = D("c")
i = E("i")
f = F("f")
d = G("d")
j = H("j")

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