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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.r: D = None
        self.x: E = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: H = None
        self.p: G = None
        self.r: F = None
        self.txt = txt

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

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

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

e = A("e")
i = B("i")
g = C("g")
l = D("l")
m = E("m")
d = F("d")
j = G("j")
f = H("f")
n = A("n")

e.t = d
e.z = g
i.t = g
i.w = e
i.r = l
i.x = m
i.q = j
i.s = f
g.o = m
g.x = f
g.w = f
g.q = i
g.v = j
l.q = f
l.z = f
l.x = m
m.o = g
m.t = f
m.p = j
m.r = d
d.x = i
j.z = d
j.w = d
j.r = d
f.v = m
n.t = d
n.z = g
assert e.t.x.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.r: D = None
        self.x: E = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: H = None
        self.p: G = None
        self.r: F = None
        self.txt = txt

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

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

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

e = A("e")
i = B("i")
g = C("g")
l = D("l")
m = E("m")
d = F("d")
j = G("j")
f = H("f")
n = A("n")

e.t = d
e.z = g
i.t = g
i.w = e
i.r = l
i.x = m
i.q = j
i.s = f
g.o = m
g.x = f
g.w = f
g.q = i
g.v = j
l.q = f
l.z = f
l.x = m
m.o = g
m.t = f
m.p = j
m.r = d
d.x = i
j.z = d
j.w = d
j.r = d
f.v = m
n.t = d
n.z = g
assert e.t.x.t.q.txt == "i"