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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: B = None
        self.r: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: F = None
        self.p: F = None
        self.x: H = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

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

i.u = j
i.q = c
i.r = e
i.p = k
i.y = k
j.x = b
j.y = i
j.r = i
k.v = c
k.r = c
k.u = j
k.s = j
g.o = k
g.u = b
g.p = b
g.x = e
g.s = i
g.q = i
m.r = b
m.q = j
m.v = g
m.o = g
m.s = k
m.x = h
b.v = e
b.q = i
b.u = k
c.x = b
c.w = m
e.x = c
e.w = c
e.v = i
h.x = b
h.y = i
h.r = i
assert i.y.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: G = None
        self.r: H = None
        self.p: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: B = None
        self.r: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: F = None
        self.p: F = None
        self.x: H = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

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

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