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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: A = None
        self.r: B = None
        self.z: A = None
        self.w: A = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.r: G = None
        self.o: G = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.o: F = None
        self.t: H = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.p: B = None
        self.t: H = None
        self.y: B = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.y: D = None
        self.txt = txt

d = A("d")
h = B("h")
m = C("m")
k = D("k")
f = E("f")
c = F("c")
l = G("l")
b = H("b")
i = F("i")

d.r = c
d.t = b
d.w = m
d.v = l
d.s = h
d.y = k
h.q = k
m.q = b
m.p = d
m.z = d
m.w = d
m.r = h
m.u = f
k.p = h
k.t = b
k.r = l
k.o = l
k.u = l
k.s = l
f.p = h
f.v = d
f.t = d
f.q = m
f.r = m
f.o = k
f.x = k
c.s = i
c.o = i
c.x = d
c.v = d
c.t = b
c.q = m
l.u = h
l.p = h
l.y = h
l.w = m
l.t = b
l.r = d
b.p = d
b.w = l
b.y = k
i.s = c
i.o = c
i.x = d
i.v = d
i.t = b
i.q = m
assert h.q.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: H = None
        self.w: C = None
        self.v: G = None
        self.s: B = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: A = None
        self.r: B = None
        self.z: A = None
        self.w: A = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: H = None
        self.r: G = None
        self.o: G = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.o: F = None
        self.t: H = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.p: B = None
        self.t: H = None
        self.y: B = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.y: D = None
        self.txt = txt

d = A("d")
h = B("h")
m = C("m")
k = D("k")
f = E("f")
c = F("c")
l = G("l")
b = H("b")
i = F("i")

d.r = c
d.t = b
d.w = m
d.v = l
d.s = h
d.y = k
h.q = k
m.q = b
m.p = d
m.z = d
m.w = d
m.r = h
m.u = f
k.p = h
k.t = b
k.r = l
k.o = l
k.u = l
k.s = l
f.p = h
f.v = d
f.t = d
f.q = m
f.r = m
f.o = k
f.x = k
c.s = i
c.o = i
c.x = d
c.v = d
c.t = b
c.q = m
l.u = h
l.p = h
l.y = h
l.w = m
l.t = b
l.r = d
b.p = d
b.w = l
b.y = k
i.s = c
i.o = c
i.x = d
i.v = d
i.t = b
i.q = m
assert h.q.p.q.txt == "k"