class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: D = None
        self.o: G = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: C = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: B = None
        self.s: E = None
        self.r: H = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.p: C = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: C = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: B = None
        self.s: E = None
        self.r: H = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: E = None
        self.p: C = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: A = None
        self.r: D = None
        self.txt = txt

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

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