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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.s: C = None
        self.u: D = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: B = None
        self.t: F = None
        self.z: C = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.s: C = None
        self.u: D = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: B = None
        self.t: F = None
        self.z: C = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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