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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: H = None
        self.y: G = None
        self.z: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: B = None
        self.r: H = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

c = A("c")
j = B("j")
e = C("e")
b = D("b")
h = E("h")
f = F("f")
a = G("a")
i = H("i")
d = E("d")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: H = None
        self.y: G = None
        self.z: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: B = None
        self.r: H = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

c = A("c")
j = B("j")
e = C("e")
b = D("b")
h = E("h")
f = F("f")
a = G("a")
i = H("i")
d = E("d")

c.w = j
c.p = b
c.u = h
c.t = f
c.v = f
j.q = e
j.p = e
j.s = i
j.y = a
j.z = b
e.x = f
b.x = a
b.v = f
h.y = f
h.w = a
f.t = c
f.z = j
f.r = i
f.s = e
a.z = c
a.v = e
i.o = a
d.y = f
d.w = a
assert c.u.y.z.z.v.r.txt == "i"