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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.y: A = None
        self.w: E = None
        self.x: H = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.w: D = None
        self.r: F = None
        self.x: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.q: G = None
        self.p: F = None
        self.s: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.y: A = None
        self.w: E = None
        self.x: H = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.w: D = None
        self.r: F = None
        self.x: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: C = None
        self.q: G = None
        self.p: F = None
        self.s: G = None
        self.txt = txt

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

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

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