class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: B = None
        self.q: G = None
        self.v: A = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.s: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: C = None
        self.x: C = None
        self.v: G = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.u: F = None
        self.y: B = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.s: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: C = None
        self.x: C = None
        self.v: G = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.u: F = None
        self.y: B = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

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

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

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