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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: G = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: G = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: E = None
        self.u: D = None
        self.v: A = None
        self.x: G = None
        self.r: B = None
        self.txt = txt

g = A("g")
d = B("d")
j = C("j")
c = D("c")
i = E("i")
k = F("k")
h = G("h")
e = H("e")
l = D("l")
a = E("a")

g.x = j
g.v = k
d.u = i
d.y = h
d.v = a
j.s = k
j.w = l
j.v = d
c.u = l
i.v = h
i.w = h
i.q = d
i.o = e
k.q = d
h.u = i
h.p = i
h.w = g
e.p = j
e.o = i
e.u = l
e.v = g
e.x = h
e.r = d
l.u = c
a.v = h
a.w = h
a.q = d
a.o = e
assert c.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: G = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: G = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: E = None
        self.u: D = None
        self.v: A = None
        self.x: G = None
        self.r: B = None
        self.txt = txt

g = A("g")
d = B("d")
j = C("j")
c = D("c")
i = E("i")
k = F("k")
h = G("h")
e = H("e")
l = D("l")
a = E("a")

g.x = j
g.v = k
d.u = i
d.y = h
d.v = a
j.s = k
j.w = l
j.v = d
c.u = l
i.v = h
i.w = h
i.q = d
i.o = e
k.q = d
h.u = i
h.p = i
h.w = g
e.p = j
e.o = i
e.u = l
e.v = g
e.x = h
e.r = d
l.u = c
a.v = h
a.w = h
a.q = d
a.o = e
assert c.u.u.u.txt == "l"