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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: B = None
        self.x: B = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: H = None
        self.t: G = None
        self.o: G = None
        self.r: B = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: B = None
        self.x: B = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: H = None
        self.t: G = None
        self.o: G = None
        self.r: B = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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