class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: B = None
        self.o: E = None
        self.p: F = None
        self.y: A = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: G = None
        self.y: B = None
        self.o: D = None
        self.r: F = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.w: G = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

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

f.v = n
f.s = n
f.t = h
f.w = l
m.u = g
m.p = g
m.o = g
m.z = l
m.v = l
m.y = c
m.t = f
m.q = h
g.z = c
g.x = m
g.o = n
g.p = l
g.u = l
g.y = f
c.t = g
c.u = n
c.x = n
n.q = m
n.y = m
n.z = a
n.o = c
n.u = c
n.r = l
l.t = g
b.s = n
b.p = n
b.u = l
b.w = a
b.q = m
h.t = f
h.v = m
a.s = n
a.p = n
a.u = l
a.w = b
a.q = m
assert c.t.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: H = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: B = None
        self.o: E = None
        self.p: F = None
        self.y: A = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: G = None
        self.y: B = None
        self.o: D = None
        self.r: F = None
        self.u: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.w: G = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

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

f.v = n
f.s = n
f.t = h
f.w = l
m.u = g
m.p = g
m.o = g
m.z = l
m.v = l
m.y = c
m.t = f
m.q = h
g.z = c
g.x = m
g.o = n
g.p = l
g.u = l
g.y = f
c.t = g
c.u = n
c.x = n
n.q = m
n.y = m
n.z = a
n.o = c
n.u = c
n.r = l
l.t = g
b.s = n
b.p = n
b.u = l
b.w = a
b.q = m
h.t = f
h.v = m
a.s = n
a.p = n
a.u = l
a.w = b
a.q = m
assert c.t.u.t.txt == "g"