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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: H = None
        self.r: A = None
        self.o: E = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: H = None
        self.x: C = None
        self.o: G = None
        self.p: H = None
        self.txt = txt

h = A("h")
c = B("c")
f = C("f")
g = D("g")
b = E("b")
m = F("m")
k = G("k")
l = H("l")
j = H("j")

h.v = f
c.w = f
c.y = j
c.r = h
c.z = h
c.o = b
f.u = m
f.p = m
f.x = c
f.o = j
f.r = h
f.q = g
g.z = k
g.r = f
b.y = k
b.p = c
m.y = g
m.x = g
m.z = h
m.r = l
k.x = c
k.o = c
l.v = h
l.u = j
l.p = j
l.x = f
l.o = k
j.v = h
j.u = l
j.p = l
j.x = f
j.o = k
assert l.u.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: H = None
        self.r: A = None
        self.o: E = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: H = None
        self.x: C = None
        self.o: G = None
        self.p: H = None
        self.txt = txt

h = A("h")
c = B("c")
f = C("f")
g = D("g")
b = E("b")
m = F("m")
k = G("k")
l = H("l")
j = H("j")

h.v = f
c.w = f
c.y = j
c.r = h
c.z = h
c.o = b
f.u = m
f.p = m
f.x = c
f.o = j
f.r = h
f.q = g
g.z = k
g.r = f
b.y = k
b.p = c
m.y = g
m.x = g
m.z = h
m.r = l
k.x = c
k.o = c
l.v = h
l.u = j
l.p = j
l.x = f
l.o = k
j.v = h
j.u = l
j.p = l
j.x = f
j.o = k
assert l.u.o.x.txt == "c"