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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

g = A("g")
l = B("l")
n = C("n")
i = D("i")
b = E("b")
c = F("c")
d = G("d")
a = H("a")
j = C("j")

g.u = j
g.v = c
g.z = a
l.y = a
n.u = b
n.q = b
i.p = g
i.w = g
i.s = l
i.v = d
b.z = i
b.y = d
c.s = b
c.r = b
c.o = g
c.v = i
c.z = l
c.u = l
c.t = l
c.y = d
d.t = c
a.r = d
a.o = l
a.z = l
a.t = l
a.q = b
j.u = b
j.q = b
assert i.v.t.y.t.z.y.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: F = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

g = A("g")
l = B("l")
n = C("n")
i = D("i")
b = E("b")
c = F("c")
d = G("d")
a = H("a")
j = C("j")

g.u = j
g.v = c
g.z = a
l.y = a
n.u = b
n.q = b
i.p = g
i.w = g
i.s = l
i.v = d
b.z = i
b.y = d
c.s = b
c.r = b
c.o = g
c.v = i
c.z = l
c.u = l
c.t = l
c.y = d
d.t = c
a.r = d
a.o = l
a.z = l
a.t = l
a.q = b
j.u = b
j.q = b
assert i.v.t.y.t.z.y.r.t.txt == "c"