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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: H = None
        self.o: H = None
        self.y: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: B = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: H = None
        self.o: H = None
        self.y: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: B = None
        self.s: A = None
        self.txt = txt

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

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

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

c.o = i
g.t = b
b.u = i
b.s = i
b.o = i
b.y = k
j.q = l
j.w = l
j.v = c
j.t = c
j.z = b
j.o = i
j.s = g
m.t = i
m.x = j
m.s = l
k.z = i
k.w = g
k.s = c
l.t = k
l.v = k
l.q = m
l.z = m
l.w = g
l.p = i
l.y = b
i.s = b
i.q = b
assert c.o.q.y.txt == "k"