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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: H = None
        self.y: H = None
        self.t: A = None
        self.v: B = None
        self.x: B = None
        self.u: B = None
        self.w: H = None
        self.txt = txt

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

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

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

a = A("a")
j = B("j")
e = C("e")
k = D("k")
c = E("c")
l = F("l")
h = G("h")
g = H("g")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: H = None
        self.y: H = None
        self.t: A = None
        self.v: B = None
        self.x: B = None
        self.u: B = None
        self.w: H = None
        self.txt = txt

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

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

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

a = A("a")
j = B("j")
e = C("e")
k = D("k")
c = E("c")
l = F("l")
h = G("h")
g = H("g")

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