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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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

g.w = l
g.p = j
g.o = e
g.t = i
j.q = c
j.t = i
h.x = c
h.o = c
h.s = j
c.r = e
c.o = g
c.y = g
l.v = c
e.z = j
e.q = l
m.u = g
i.x = c
i.y = j
i.q = l
i.v = l
i.z = l
i.r = m
i.o = g
i.t = g
f.x = c
f.o = c
f.s = j
assert c.y.p.q.r.q.v.r.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: B = None
        self.o: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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