class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: H = None
        self.v: E = None
        self.y: H = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: C = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: C = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

c.o = h
c.s = h
c.p = j
c.y = j
c.v = g
d.s = b
b.o = c
m.y = c
m.q = c
m.p = b
m.u = a
g.t = h
i.p = j
h.u = d
h.w = m
j.v = c
j.s = c
j.q = m
j.t = b
j.p = i
j.y = d
j.r = h
j.w = h
a.y = c
a.q = c
a.p = b
a.u = m
assert i.p.t.o.txt == "c"