class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.z: E = None
        self.p: E = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: H = None
        self.w: H = None
        self.s: F = None
        self.p: G = None
        self.x: A = None
        self.z: H = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.z: H = None
        self.r: A = None
        self.txt = txt

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

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

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

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

g.r = f
g.v = c
g.z = d
g.p = m
g.t = e
j.w = c
c.v = j
c.r = j
c.o = k
c.w = k
c.z = k
c.s = i
c.p = f
c.x = g
e.t = c
e.u = d
e.s = i
d.q = m
d.x = c
d.z = k
d.r = g
i.r = k
i.q = g
i.w = g
i.v = g
i.o = j
i.s = j
f.p = e
f.q = e
f.v = m
k.p = d
k.r = i
m.q = d
m.x = c
m.z = k
m.r = g
assert d.r.v.r.w.w.p.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.z: E = None
        self.p: E = None
        self.t: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: H = None
        self.w: H = None
        self.s: F = None
        self.p: G = None
        self.x: A = None
        self.z: H = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.z: H = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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